﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Tetris
{
    class Renderer
    {
        public void PrintField(GameField f)
        {
            bool[,] _field = new bool[f.Widths, f.Heights];
            Console.SetWindowSize(f.Widths + 15, f.Heights);
            Console.CursorVisible = false;
            for (int i = 0; i < f.Heights; i++)
            {
                for (int j = 0; j < f.Widths; j++)
                {
                    Console.Write(".");
                }
                Console.WriteLine();
            }
        }
            public void PrintShapes(Shape s)
            {
                    foreach (Point ofitem in s.LastCoordinates)
                    {

                        Console.SetCursorPosition(ofitem.x, ofitem.y);

                        Console.Write(".");
                    }
                    foreach(Point ofitem in s.Coordinates)
                    {
                        Console.SetCursorPosition(ofitem.x, ofitem.y);

                        Console.Write("#");
                    }
            }
            public void PrintScore(int G, GameField f)
            {
                Console.SetCursorPosition(f.Widths + 1, f.Heights - 3);
                Console.WriteLine("Score: {0}", G);
            }
            public void PrintGameOver(GameField f)
            {
                Console.SetCursorPosition(f.Widths + 1, f.Heights - 1);
                Console.WriteLine("GAME OVER");
            }
        
    }
}
